<template>
  <div>
    <el-link @click="logout">退出登录</el-link>
  </div>
</template>

<script>
export default {
  name: 'NavBar',
  methods: {
    logout () {
      this.$store.dispatch('auth/reset').then(() => {
        this.$router.push({ name: 'login' })
      })
    }
  }
}
</script>

<style scoped>

</style>
